package com.example.analysis.controller;

import com.example.analysis.dto.ClusterScoreDto;
import com.example.analysis.service.StudentService;
import com.example.analysis.utils.Response;
import com.example.analysis.vo.ClusterScoreVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/cluster_score")
@CrossOrigin
public class ClusterScoreController {
    @Autowired
    private StudentService studentService;


    @PostMapping("/cluster")
    Response<List<ClusterScoreVo>> getCluster(@RequestParam String classId, @RequestParam String subId, @RequestParam String clusterNum) {
        return studentService.getScoreSet(classId, subId);
    }

    @PostMapping("/cluster_sup")
    Response<List<ClusterScoreVo>> getClusterSup(@RequestParam String subId, @RequestParam String clusterNum) {
        return studentService.getScoreSetSup(subId);
    }

    @PostMapping("/cluster_sup_stu")
    Response<List<ClusterScoreVo>> getClusterSupStu(@RequestParam String subId, @RequestParam String clusterNum) {
        return studentService.getScoreSetSupStu(subId);
    }

//    @GetMapping("/cluster")
//    Response<List<ClusterScoreVo>> getCluster() {
//        return studentService.getScoreSet();
//    }
}
